import { createApp } from "vue";
import { createPinia } from "pinia";
import * as mars3d from "mars3d";
import * as Cesium from "mars3d-cesium";
const app = createApp({});
app.use(createPinia());
import { useStore } from "@/stores/index";
const store = useStore();
import { widgetStore } from "@/stores/widget";
const widget = widgetStore();
/**
 * 关闭右键菜单
 * @author scw 2024-2-1 10:19:06
 */
const closeContextMenu = () => {
    if (widget.contextMenu.show) {
        widget.contextMenu.show = false;
    }
};
let map: any = undefined;
let graphicLayer: any = undefined;
const setMap = (data: any) => {
    map = data;
};
const setGraphicLayer = (data: any) => {
    graphicLayer = data;
};
// 全局变量  全局方法  全局组件  全局函数
export {
    mars3d,
    Cesium,
    store, // 全局store   数据相关
    widget, // 全局widget  控件相关
    closeContextMenu, // 关闭右键菜单
    setMap, // 设置map
    setGraphicLayer, // 设置图层
    graphicLayer, // 图层
    map, // map
};
